<?php

namespace App\Http\Controllers\System;

use Illuminate\Http\Request;
use App\Models\System\Setting;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\Auth;

class SettingController extends Controller
{
	/**
	 * 获取系统设置
	 *
	 * Date: 27/04/2018
	 * @author George
	 * @return \Illuminate\Http\JsonResponse
	 */
    public function index()
    {
    	$user = Auth::user();
    	$seeting = Setting::query()->where('company_id', $user->company_id)->first();
    	return success($seeting);
    }

    /**
     * Update the specified resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  \App\Models\System\Setting  $seeting
     * @return \Illuminate\Http\Response
     */
    public function update(Request $request, Setting $seeting)
    {
    	// todo
    }
}
